package com.lantosec.hmrp.modules.eval.entity;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.util.Date;

import com.lantosec.hmrp.core.mvc.BaseEntity;
import com.lantosec.hmrp.modules.eval.vo.EvalApplyDetailVO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * <p>
 * 奖惩申报项目明细 实体类
 * </p>
 *
 * @author AutoCode
 * @since 2020-06-23
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class EvalApplyDetail extends BaseEntity<EvalApplyDetailVO> {

    private static final long serialVersionUID = 1L;
    public EvalApplyDetail(EvalApplyDetailVO vo){
        this.evalApplyDetailId = vo.getEvalApplyDetailId();
        this.evalApplyId = vo.getEvalApplyId();
        this.evalItemId = vo.getEvalItemId();
        this.rewardOrientation = vo.getRewardOrientation();
        this.rewardStandard = vo.getRewardStandard();
        this.rewardUpLimit = vo.getRewardUpLimit();
        this.rewardLowLimit = vo.getRewardLowLimit();
        this.chargeUserId = vo.getChargeUserId();
        this.chargeUser = vo.getChargeUser();
        this.rewardType = vo.getRewardType();
        this.rewardValue = vo.getRewardValue();
        this.eventDate = vo.getEventDate();
        this.eventDescribe = vo.getEventDescribe();
        this.photoList = vo.getPhotoList();
        this.targetMode = vo.getTargetMode();
        this.targetDeptId = vo.getTargetDeptId();
        this.targetDept = vo.getTargetDept();
        this.targetUserId = vo.getTargetUserId();
        this.targetUser = vo.getTargetUser();
        this.deptAuditorId = vo.getDeptAuditorId();
        this.deptAuditor = vo.getDeptAuditor();
        this.deptAuditTime = vo.getDeptAuditTime();
        this.finAuditorId = vo.getFinAuditorId();
        this.finAuditor = vo.getFinAuditor();
        this.finAuditTime = vo.getFinAuditTime();
        this.auditState = vo.getAuditState();
    }

    @Override
    public EvalApplyDetailVO convertToVO(){
        return new EvalApplyDetailVO(this);
    }


    /**
     * 主键ID
     */
    @TableId(value = "eval_apply_detail_id", type = IdType.AUTO)
    private Integer evalApplyDetailId;

    /**
     * 奖惩申报ID
     */
    private Integer evalApplyId;

    /**
     * 考评项目ID
     */
    private String evalItemId;

    /**
     * 项目类型(1分 2钱)
     */
    private Integer rewardOrientation;

    /**
     * 项目标准值
     */
    private BigDecimal rewardStandard;

    /**
     * 项目得分上限
     */
    private BigDecimal rewardUpLimit;

    /**
     * 项目得分下限
     */
    private BigDecimal rewardLowLimit;

    /**
     * 项目负责人ID
     */
    private String chargeUserId;

    /**
     * 项目负责人
     */
    private String chargeUser;

    /**
     * 奖惩形式(1奖 2惩)
     */
    private Integer rewardType;

    /**
     * 奖惩值(正为奖 负为惩)
     */
    private BigDecimal rewardValue;

    /**
     * 事件发生日期(yyyy-mm-dd)
     */
    private String eventDate;

    /**
     * 事件描述
     */
    private String eventDescribe;

    /**
     * 附件图片
     */
    private String photoList;

    /**
     * 责任对象类型(1科室 3个人)
     */
    private Integer targetMode;

    /**
     * 责任科室ID
     */
    private String targetDeptId;

    /**
     * 责任科室
     */
    private String targetDept;

    /**
     * 责任人ID
     */
    private String targetUserId;

    /**
     * 责任人
     */
    private String targetUser;

    /**
     * 科室审核人ID
     */
    private String deptAuditorId;

    /**
     * 科室审核人
     */
    private String deptAuditor;

    /**
     * 科室审核时间
     */
    private Date deptAuditTime;

    /**
     * 最终审核人ID
     */
    private String finAuditorId;

    /**
     * 最终审核人
     */
    private String finAuditor;

    /**
     * 最终审核时间
     */
    private Date finAuditTime;

    /**
     * 审核状态(0待审核 1科室审核通过 2最终审核通过 3审核不通过)
     */
    private Integer auditState;


    public enum ColName {
        eval_apply_detail_id, eval_apply_id, eval_item_id, reward_orientation, reward_standard, reward_up_limit, reward_low_limit, charge_user_id, charge_user, reward_type, reward_value, event_date, event_describe, photo_list, target_mode, target_dept_id, target_dept, target_user_id, target_user, dept_auditor_id, dept_auditor, dept_audit_time, fin_auditor_id, fin_auditor, fin_audit_time, audit_state, 
    }
}
